import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: {
      img: '',
      name: ''
    },
    token: ''
  },
  mutations: {
    setToken(state, token) {
      state.token = token
    },
    setUser(state, user) {
      state.user = user
    },
    clearToken(state){
      state.token = ''
    }
  },
  actions: {
  },
  modules: {

  }
})
